package com.example.demo.controller;

import com.example.demo.Mappers.GetRecipeListMapper;
import com.example.demo.Mappers.RegistMapper;
import com.example.demo.Service.ZDghService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2018-05-07.
 */
@RestController
public class TestController {
    @Autowired
    private RegistMapper rmapper;
    @Autowired
    private GetRecipeListMapper mapper;
    @Autowired
    private ZDghService service;
    @RequestMapping(value = "test")
    public void getinfo()
    {
      //  List<OrderBean> getoederinfo=    rmapper.getAutoBean();
        System.out.print("打印出来的数据");

    }

    @RequestMapping(value = "yyghcl")
    /**预约处理****/
    public  void  yycl(){
       service.zdgh();
    }



    /**public GetRecipeListResponse test(){
        System.out.print("已经开始执行");
        List<GetRecipeListItem3> item3s=new ArrayList<>();
        item3s =mapper.selectRecipe("20180507000001");
//        System.out.print(item3s.get(0).getDoctName());
        List<GetRecipeListItem2>item2s=new ArrayList<>();
        for (int i=0;i<item3s.size();i++){
            List<GetRecipeListtem1> listtem1s=new ArrayList<>();
            listtem1s=mapper.selectdetailRecipe(item3s.get(i).getGhxh(),item3s.get(i).getYzlx());
            GetRecipeListItem2 item2=new GetRecipeListItem2(listtem1s,item3s.get(i).getDeptID(),
                    item3s.get(i).getDeptName(),item3s.get(i).getDoctName(),item3s.get(i).getRecipeID(),item3s.get(i).getRecipeName(),item3s.get(i).getRecipeType(),item3s.get(i).getRecipeAmount(),item3s.get(i).getExecDept(),item3s.get(i).getExecLocation(),item3s.get(i).getRecipeDate(),item3s.get(i).getExecDate(),item3s.get(i).getNote());
            item2s.add(item2);
        }
        GetRecipeListResponse response=new GetRecipeListResponse();
        response.setResultCode("0");
        response.setResultMsg("交易成功");
        response.setRecipes(item2s);
return  response;
    }  **/
}
